<HTML>
<HEAD>
<!-- Created by texi2html 1.56k from topoly-user-doc.texi on 2 November 2009 -->

<TITLE>Untitled Document</TITLE>
</HEAD>
<BODY>
<H1>Untitled Document</H1>
<P>
<P><HR><P>

<P>
The packages <CODE>topoly</CODE> and <CODE>to_poly_solve</CODE> are experimental;
the specifications of the functions in these packages might change or
the some of the functions in these packages might be merged into other
Maxima functions.


<P>
Barton Willis (Professor of Mathematics, University of Nebraska at
Kearney) wrote the <CODE>topoly</CODE> and <CODE>to_poly_solve</CODE> packages and the
English language user documentation for these packages.


<P>
<DL>
<DT><U>Operator:</U> <B>%and</B>
<DD><A NAME="IDX1"></A>


<P>
The operator <CODE>%and</CODE> is a simplifying nonshort-circuited logical
conjunction. Maxima simplifies an <CODE>%and</CODE> expression to either
true, false, or a logically equivalent, but simplified,
expression. The operator <CODE>%and</CODE> is associative, commutative, and
idempotent.  Thus when <CODE>%and</CODE> returns a noun form, the arguments
of <CODE>%and</CODE> form a non-redundant sorted list; for example

<PRE>
 (%i1) a %and (a %and b);
 (%o1) a %and b
</PRE>

<P>
If one argument to a conjunction is the <I>explicit</I> the negation of another
argument, <CODE>%and</CODE> returns false:

<PRE>
 (%i2) a %and (not a);
 (%o2) false
</PRE>

<P>
If any member of the conjunction is false, the conjunction simplifies
to false even if other members are manifestly non-boolean; for example

<PRE>
 (%i1) 42 %and false;
 (%o1) false
</PRE>

<P>
Any argument of an <CODE>%and</CODE> expression that is an inequation (that
is, an inequality or equation), is simplified using the Fourier
elimination package. The Fourier elimination simplifier has a
pre-processor that converts some, but not all, nonlinear inequations
into linear inequations; for example the Fourier elimination code
simplifies
<CODE>abs(x) + 1 &#62; 0</CODE> to true, so 

<PRE>
 (%i1) (x &#60; 1) %and (abs(x) + 1 &#62; 0);
 (%o1) x&#60;1
</PRE>

<P>
<B>Notes</B>  

<UL>
<LI>The option variable <CODE>prederror</CODE> does <I>not</I> alter the

simplification <CODE>%and</CODE> expressions.

<LI>To avoid operator precedence errors, compound expressions

involving the operators <CODE>%and, %or</CODE>, and <CODE>not</CODE> should be
fully parenthesized.

<LI>The Maxima operators <EM>and</EM> and <EM>or</EM> are both

short-circuited. Thus <EM>and</EM> isn't associative or commutative.

</UL>

<P>
<B>Limitations</B> The conjunction <CODE>%and</CODE> simplifies inequations
<I>locally, not globally</I>. This means that conjunctions such as

<PRE>
 (%i1) (x &#60; 1) %and (x &#62; 1);
 (%o1) (x &#62; 1) %and (x &#60; 1)
</PRE>

<P>
do <I>not</I> simplify to false. Also, the Fourier elimination code <I>ignores</I>
the fact database;

<PRE>
 (%i1) assume(x &#62; 5);
 (%o1) [x&#62;5]
 (%i2) (x &#62; 1) %and (x &#62; 2);
 (%o2) (x &#62; 1) %and (x &#62; 2)
</PRE>

<P>
Finally, nonlinear inequations that aren't easily converted into an
equivalent linear inequation aren't simplified.


<P>
There is no support for distributing <EM>%and</EM> over <EM>%or</EM>;
neither is there support for distributing a logical negation over
<EM>%and</EM>.


<P>
<B>To use</B> <TT>`load(to_poly_solver)'</TT>


<P>
<B>Related functions</B> <EM>%or, %if, and, or, not</EM>


<P>
<B>Status</B> The operator <CODE>%and</CODE> is experimental; the
specifications of this function might change and its functionality
might be merged into other Maxima functions.


</DL>

<P>
<DL>
<DT><U>Operator:</U> <B>%if</B> <I>( <VAR>bool</VAR>, <VAR>a</VAR>, <VAR>b</VAR>)</I>
<DD><A NAME="IDX2"></A>


<P>
The operator <CODE>%if</CODE> is a simplifying conditional. The
<I>conditional</I> <EM>bool</EM> should be boolean-valued. When the
conditional is true, return the second argument; when the conditional
is false, return the third; in all other cases, return a noun form.


<P>
Maxima inequations (either an inequality or an equality) are <I>not</I>
boolean-valued; for example, Maxima does <I>not</I> simplify <EM>5 &#60; 6</EM>
to true, and it does not simplify <EM>5 = 6</EM> to false; however, in
the context of a conditional to an <EM>%if</EM> statement, Maxima
<I>automatically</I> attempts to determine the truth value of an
inequation. Examples:

<PRE>
 (%i1) f : %if(x # 1, 2, 8);
 (%o1) %if(x-1#0,2,8)

 (%i2) [subst(x = -1,f), subst(x=1,f)];
 (%o2) [2,8]
</PRE>

<P>
If the conditional involves an inequation, Maxima simplifies it using
the Fourier elimination package.


<P>
<B>Notes</B> 



<UL>
<LI>If the conditional is manifestly non-boolean, Maxima returns a noun form:


<PRE>
 (%i1) %if(42,1,2);
 (%o1) %if(42,1,2)
</PRE>

<LI>

<LI>The Maxima operator <CODE>if</CODE> is nary, the operator <CODE>%if</CODE> <I>isn't</I> nary.

</UL>

<P>
<B>Limitations</B> The Fourier elimination code only simplifies nonlinear
inequations that are readily convertible to an equivalent linear
inequation. 


<P>
<B>To use:</B> <TT>`load(to_poly_solver)'</TT>


<P>
<B>Status:</B> The operator <CODE>%if</CODE> is experimental; its
specifications might change and its functionality might be merged into
other Maxima functions.


</DL>
<P>
  
<DL>
<DT><U>Operator:</U> <B>%or</B>
<DD><A NAME="IDX3"></A>


<P>
The operator <CODE>%or</CODE> is a simplifying nonshort-circuited logical
disjunction. Maxima simplifies an <CODE>%or</CODE> expression to either
true, false, or a logically equivalent, but simplified,
expression. The operator <CODE>%or</CODE> is associative, commutative, and
idempotent. Thus when <CODE>%or</CODE> returns a noun form, the arguments
of <CODE>%or</CODE> form a non-redundant sorted list; for example

<PRE>
 (%i1) a %or (a %or b);
 (%o1) a %or b
</PRE>

<P>
If one member of the disjunction is the <I>explicit</I> the negation of another
member, <CODE>%or</CODE> returns true:

<PRE>
 (%i2) a %or (not a);
 (%o2) true
</PRE>

<P>
If any member of the disjunction is true, the disjunction simplifies
to true even if other members of the disjunction are manifestly non-boolean;
for example

<PRE>
 (%i1) 42 %or true;
 (%o1) true
</PRE>

<P>
Any argument of an <CODE>%or</CODE> expression that is an inequation (that
is, an inequality or equation), is simplified using the Fourier
elimination package. The Fourier elimination code simplifies
<CODE>abs(x) + 1 &#62; 0</CODE> to true, so we have

<PRE>
 (%i3) (x &#60; 1) %or (abs(x) + 1 &#62; 0);
 (%o3) true
</PRE>

<P>
<B>Notes</B>  

<UL>
<LI>The option variable <CODE>prederror</CODE> does <I>not</I> alter the

simplification of <CODE>%or</CODE> expressions.

<LI>You should parenthesize compound expressions involving the

operators <CODE>%and, %or</CODE>, and <CODE>not</CODE>; the binding powers of these
operators might not match your expectations.

<LI>The Maxima operators <EM>and</EM> and <EM>or</EM> are both short-circuited.

Thus <EM>or</EM> isn't associative or commutative.

</UL>

<P>
<B>Limitations</B> The conjunction <CODE>%or</CODE> simplifies inequations
<I>locally, not globally</I>. This means that conjunctions such as

<PRE>
 (%i1) (x &#60; 1) %or (x &#62;= 1);
 (%o1) (x &#62; 1) %or (x &#62;= 1)
</PRE>

<P>
do <I>not</I> simplify to true. Further, the Fourier elimination code ignores
the fact database;

<PRE>
 (%i1) assume(x &#62; 5);
 (%o1) [x&#62;5]
 (%i2) (x &#62; 1) %and (x &#62; 2);
 (%o2) (x &#62; 1) %and (x &#62; 2)
</PRE>

<P>
Finally, nonlinear inequations that aren't easily converted into an
equivalent linear inequation aren't simplified.


<P>
The algorithm that looks for terms that cannot both be false is weak;
also there is no support for distributing <EM>%or</EM> over <EM>%and</EM>;
neither is there support for distributing a logical negation over
<EM>%or</EM>.


<P>
<B>To use</B> <TT>`load(to_poly_solver)'</TT>


<P>
<B>Related functions</B> <EM>%or, %if, and, or, not</EM>


<P>
<B>Status</B> The operator <CODE>%or</CODE> is experimental; the
specifications of this function might change and its functionality
might be merged into other Maxima functions.


</DL>

<P>
<DL>
<DT><U>Function:</U> <B>complex_number_p</B> <I>(<VAR>x</VAR>)</I>
<DD><A NAME="IDX4"></A>


<P>
The predicate <CODE>complex_number_p</CODE> returns true if its argument is
either <EM>a + %i * b</EM>, <EM>a</EM>, <EM>%i b</EM>, or <EM>%i</EM>,
where <CODE>a</CODE> and <CODE>b</CODE> are either rational or floating point
numbers (including big floating point); for all other inputs,
<CODE>complex_number_p</CODE> returns false; for example

<PRE>
 (%i2) map('complex_number_p,[2/3, 2 + 1.5 * %i, %i]);
 (%o2) [true,true,true]

 (%i3) complex_number_p((2+%i)/(5-%i));
 (%o3) false

 (%i4) complex_number_p(cos(5 - 2 * %i));
 (%o4) false
</PRE>

<P>
<B>Related functions</B> <CODE>isreal_p</CODE>


<P>
<B>To use</B> <TT>`load(to_poly_solver)'</TT>


<P>
<B>Status</B> The operator <CODE>complex_number_p</CODE> is experimental; its
specifications might change and its functionality might be merged into
other Maxima functions.


</DL>

<P>
<DL>
<DT><U>Function:</U> <B>compose_functions</B> <I>(<VAR>l</VAR>)</I>
<DD><A NAME="IDX5"></A>


<P>
The function call <CODE>compose_functions(l)</CODE> returns a lambda form that is
the <I>composition</I> of the functions in the list <VAR>l</VAR>. The functions are
applied from <I>right</I> to <I>left</I>; for example

<PRE>
 (%i1) compose_functions([cos, exp]);
 (%o1) lambda([%g0],cos(%e^%g0))

 (%i2) %(x);
 (%o2) cos(%e^x)
</PRE>

<P>
When the function list is empty, return the identity function:

<PRE>
 (%i3) compose_functions([]);
 (%o3) lambda([%g1],%g1)

 (%i4) %(x);
 (%o4) x
</PRE>

<P>
<B>Notes</B> 

<UL>
<LI>When Maxima determines that a list member isn't a symbol or

a lambda form, <CODE>funmake</CODE> (<I>not</I> <CODE>compose_functions</CODE>)
signals an error:

<PRE>
 (%i5) compose_functions([a &#60; b]);
 Bad first argument to `funmake': a&#60;b
</PRE>

<LI>To avoid name conflicts, the independent variable is determined by the function <CODE>new_variable</CODE>.


<PRE>
 (%i1) compose_functions([%g0]);
 (%o1) lambda([%g4],%g0(%g4))

 (%i2) compose_functions([%g0]);
 (%o2) lambda([%g5],%g0(%g5))
</PRE>

Although the independent variables are different, Maxima is able to to
deduce that these lambda forms are semantically equal:

<PRE>
 (%i3) is(equal(%o1,%o2));
 (%o3) true
</PRE>

</UL>

<P>
<B>To use</B> <TT>`load(to_poly_solver)'</TT>


<P>
<B>Status</B>  The function <CODE>compose_functions</CODE> is experimental; its
specifications might change and its functionality might be merged into
other Maxima functions.
</DL>


<P>
<DL>
<DT><U>Function:</U> <B>dfloat</B> <I>(<VAR>x</VAR>)</I>
<DD><A NAME="IDX6"></A>


<P>
The function <CODE>dfloat</CODE> is a similar to <CODE>float</CODE>, but the function
<CODE>dfloat</CODE> applies <CODE>rectform</CODE> when <CODE>float</CODE> fails to evaluate
to an IEEE double floating point number; thus

<PRE>
 (%i1) float(4.5^(1 + %i));
 (%o1) 4.5^(%i+1)

 (%i2) dfloat(4.5^(1 + %i));
 (%o2) 4.48998802962884*%i+0.30001248938957
</PRE>

<P>
<B>Notes</B> 



<UL>
<LI>The rectangular form of an expression might be poorly suited for

numerical evaluation--for example, the rectangular form might
needlessly involve the difference of floating point numbers
(subtractive cancellation).

<LI>The identifier <CODE>float</CODE> is both an option variable (default

value false) and a function name.

</UL>

<P>
<B>Related functions</B> <CODE>float, bfloat</CODE>


<P>
<B>To use</B> <TT>`load(to_poly_solver)'</TT>


<P>
<B>Status</B> The function <CODE>dfloat</CODE> is experimental; its
specifications might change and its functionality might be merged into
other Maxima functions.


</DL>

<P>
<DL>
<DT><U>Function:</U> <B>elim</B> <I>(<VAR>l</VAR>, <VAR>x</VAR>)</I>
<DD><A NAME="IDX7"></A>


<P>
The function <CODE>elim</CODE> eliminates the variables in the set or list
<CODE>x</CODE> from the equations in the set or list <CODE>l</CODE>. Each member
of <CODE>x</CODE> must be a symbol; the members of <CODE>l</CODE> can either be
equations, or expressions that are assumed to equal zero.


<P>
The function <CODE>elim</CODE> returns a list of two lists; the first is
the list of expressions with the variables eliminated; the second
is the list of pivots; thus, the second list is a list of
expressions that <CODE>elim</CODE> used to eliminate the variables.


<P>
Here is a example of eliminating between linear equations:

<PRE>
 (%i1) elim(set(x + y + z = 1, x - y  - z = 8, x - z = 1),set(x,y));
 (%o1) [[2*z-7],[y+7,z-x+1]]
</PRE>

<P>
Eliminating <CODE>x</CODE> and <CODE>y</CODE> yields the single equation <CODE>2 z - 7 = 0</CODE>;
the equations <CODE>y + 7 = 0</CODE> and <CODE>z - z + 1 = 1</CODE> were used as pivots.
Eliminating all three variables from these equations, triangularizes the linear system:



<PRE>
 (%i2) elim(set(x + y + z = 1, x - y  - z = 8, x - z = 1),set(x,y,z));
 (%o2) [[],[2*z-7,y+7,z-x+1]]
</PRE>

<P>
Of course, the equations needn't be linear:

<PRE>
 (%i6) elim(set(x^2 - 2 * y^3 = 1,  x - y = 5), [x,y]);
 (%o6) [[],[2*y^3-y^2-10*y-24,y-x+5]]
</PRE>

<P>
The user doesn't control the order the variables are
eliminated. Instead, the algorithm uses a heuristic to <I>attempt</I> to
choose the best pivot and the best elimination order.


<P>
<B>Notes</B> 



<UL>

<LI>Unlike the related function <CODE>eliminate</CODE>, the function

<CODE>elim</CODE> does <I>not</I> invoke <CODE>solve</CODE> when the number of equations
equals the number of variables. 

<LI>The function <CODE>elim</CODE> works by applying resultants; the option

variable <CODE>resultant</CODE> determines which algorithm Maxima
uses. Using <CODE>sqfr</CODE>, Maxima factors each resultant and suppresses
multiple zeros.

<LI>The <CODE>elim</CODE> will triangularize a nonlinear set of polynomial

equations; the solution set of the triangularized set <I>can</I> be larger
than that solution set of the untriangularized set. Thus, the triangularized
equations can have <I>spurious</I> solutions.

<LI>

</UL>

<P>
<B>Related functions</B> <I>elim_allbut, eliminate_using, eliminate</I>


<P>
<B>Option variables</B> <I>resultant</I>


<P>
<B>To use</B> <TT>`load(to_poly)'</TT>


<P>
<B>Status</B> The function <CODE>elim</CODE> is experimental; its
specifications might change and its functionality might be merged into
other Maxima functions.


</DL>
<P>
 
<DL>
<DT><U>Function:</U> <B>elim_allbut</B> <I>(<VAR>l</VAR>, <VAR>x</VAR>)</I>
<DD><A NAME="IDX8"></A>


<P>
This function is similar to <CODE>elim</CODE>, except that it eliminates all the
variables in the list of equations <CODE>l</CODE> <I>except</I> for those variables that
in in the list <CODE>x</CODE>



<PRE>
 (%i1) elim_allbut([x+y = 1, x - 5*y = 1],[]);
 (%o1) [[],[y,y+x-1]]

 (%i2) elim_allbut([x+y = 1, x - 5*y = 1],[x]);
 (%o2) [[x-1],[y+x-1]]
</PRE>

<P>
<B>To use</B> <TT>`load(to_poly)'</TT>


<P>
<B>Option variables</B> <I>resultant</I>


<P>
<B>Related functions</B> <I>elim, eliminate_using, eliminate</I>


<P>
<B>Status</B> The function <CODE>elim_allbut</CODE> is experimental; its
specifications might change and its functionality might be merged into
other Maxima functions.


</DL>

<P>
<DL>
<DT><U>Function:</U> <B>eliminate_using</B> <I>(<VAR>l</VAR>, <VAR>e</VAR>, <VAR>x</VAR>)</I>
<DD><A NAME="IDX9"></A>


<P>
Using <CODE>e</CODE> as the pivot, eliminate the symbol <CODE>x</CODE> from the
list or set of equations in <CODE>l</CODE>. The function <CODE>eliminate_using</CODE>
returns a set.



<PRE>
(%i1) eq : [x^2 - y^2 - z^3 , x*y - z^2 - 5, x - y + z];
(%o1) [-z^3-y^2+x^2,-z^2+x*y-5,z-y+x]

(%i2) eliminate_using(eq,first(eq),z);
(%o2) {y^3+(1-3*x)*y^2+3*x^2*y-x^3-x^2,y^4-x^3*y^3+13*x^2*y^2-75*x*y+x^4+125}

(%i3) eliminate_using(eq,second(eq),z);
(%o3) {y^2-3*x*y+x^2+5,y^4-x^3*y^3+13*x^2*y^2-75*x*y+x^4+125}

(%i4) eliminate_using(eq, third(eq),z);
(%o4) {y^2-3*x*y+x^2+5,y^3+(1-3*x)*y^2+3*x^2*y-x^3-x^2}
</PRE>

<P>
<B>Option variables</B> <I>resultant</I>


<P>
<B>Related functions</B> <I>elim, eliminate, elim_allbut</I>


<P>
<B>To use</B> <TT>`load(topoly)'</TT>


<P>
<B>Status</B> The function <CODE>eliminate_using</CODE> is experimental; its
specifications might change and its functionality might be merged into
other Maxima functions.


</DL>

<P>
<DL>
<DT><U>Function:</U> <B>fourier_elim</B> <I>([<VAR>eq1</VAR>, <VAR>eq2</VAR>, ...], [<VAR>var1</VAR>, <VAR>var</VAR>, ...])</I>
<DD><A NAME="IDX10"></A>


<P>
Fourier elimination is the analog of Gauss elimination for linear inequations (equations or
inequalities). The function call <CODE>fourier_elim([eq1,eq2,...], [var1,var2,...]</CODE> does 
Fourier elimination on a list of linear inequations <CODE>[eq1,eq2,...]</CODE> with respect to the 
variables <CODE>[var1,var2,...]</CODE>; for example

<PRE>
 (%i7) fourier_elim([y-x &#60; 5, x - y &#60; 7, 10 &#60; y],[x,y]);
 (%o7) [y-5&#60;x,x&#60;y+7,10&#60;y]

 (%i8) fourier_elim([y-x &#60; 5, x - y &#60; 7, 10 &#60; y],[y,x]);
 (%o8) [max(10,x-7)&#60;y,y&#60;x+5,5&#60;x]
</PRE>

<P>
Eliminating first with respect to <EM>x</EM> and second with respect to
<EM>y</EM> yields lower and upper bounds for <EM>x</EM> that depend on
<EM>y</EM>, and lower and upper bounds for <EM>y</EM> that are numbers.
Eliminating in the other order gives <EM>x</EM> dependent lower and
upper bounds for <EM>y</EM>, and numerical lower and upper bounds for
<EM>x</EM>.


<P>
When necessary, <CODE>fourier_elim</CODE> returns a <EM>disjunction</EM> of lists of inequations:

<PRE>
 (%i1) fourier_elim([x # 6],[x]);
 (%o1) [x&#60;6] or [6&#60;x]
</PRE>

<P>
When the solution set is empty,  <CODE>fourier_elim</CODE> returns <CODE>emptyset</CODE>,
and when the solution set is all reals, <CODE>fourier_elim</CODE> returns <CODE>universalset</CODE>;
for example

<PRE>
 (%i1) fourier_elim([x &#60; 1, x &#62; 1],[x]);
 (%o1) emptyset

 (%i2) fourier_elim([minf &#60; x, x &#60; inf],[x]);
 (%o2) universalset
</PRE>

<P>
For nonlinear inequations, <CODE>fourier_elim</CODE> returns a (somewhat) 
simplified list of inequations:

<PRE>
 (%i1) fourier_elim([x^3 - 1 &#62; 0],[x]);
 (%o1) [1&#60;x,x^2+x+1&#62;0] or [x&#60;1,-(x^2+x+1)&#62;0]

 (%i2) fourier_elim([cos(x) &#60; 1/2],[x]);
 (%o2) [1-2*cos(x)&#62;0]
</PRE>

<P>
Instead of a list of inequations, the first argument to <CODE>fourier_elim</CODE>
may be a logical disjunction or conjunction:

<PRE>
 (%i1) fourier_elim((x + y &#60; 5) and (x - y &#62;8),[x,y]);
 (%o1) [y+8&#60;x,x&#60;5-y,y&#60;-3/2]

 (%i2) fourier_elim(((x + y &#60; 5) and x &#60; 1) or  (x - y &#62;8),[x,y]);
 (%o2) [y+8&#60;x] or [x&#60;min(1,5-y)]
</PRE>

<P>
The function <CODE>fourier_elim</CODE> supports the inequation operators 
<EM>&#60;, &#60;=, &#62;, &#62;=, #</EM>, and <EM>=</EM>.


<P>
The Fourier elimination code has a preprocessor that converts some
nonlinear inequations that involve the absolute value, minimum, and
maximum functions into linear in equations. Additionally, the preprocessor
handles some expressions that are the product or quotient of linear terms:

<PRE>
 (%i9) fourier_elim([max(x,y) &#62; 6, x # 8, abs(y-1) &#62; 12],[x,y]);
 (%o9) [6&#60;x,x&#60;8,y&#60;-11] or [8&#60;x,y&#60;-11] or [x&#60;8,13&#60;y] or [x=y,13&#60;y] or [8&#60;x,x&#60;y,13&#60;y] or [y&#60;x,13&#60;y]

 (%i10) fourier_elim([(x+6)/(x-9) &#60;= 6],[x]);
 (%o10) [x=12] or [12&#60;x] or [x&#60;9]

 (%i11) fourier_elim([x^2 - 1 # 0],[x]);
 (%o11) [-1&#60;x,x&#60;1] or [1&#60;x] or [x&#60;-1]
</PRE>

<P>
<B>To use</B> <TT>`load(fourier_elim)'</TT>


</DL>

<P>
<DL>
<DT><U>Function:</U> <B>isreal_p</B> <I>(<VAR>e</VAR>)</I>
<DD><A NAME="IDX11"></A>


<P>
The predicate <CODE>isreal_p</CODE> returns true when Maxima is able to
determine that <CODE>e</CODE> is real-valued on the <I>entire</I> real line; it
returns false when Maxima is able to determine that <CODE>e</CODE> <I>isn't</I>
real-valued on some nonempty subset of the real line; and it returns a
noun form for all other cases.

<PRE>
 (%i1) map('isreal_p, [-1, 0, %i, %pi]);
 (%o1) [true,true,false,true]
</PRE>

<P>
Maxima variables are assumed to be real; thus

<PRE>
 (%i2) isreal_p(x);
 (%o2) true
</PRE>

<P>
The function <CODE>isreal_p</CODE> examines the fact database:

<PRE>
 (%i3) declare(z,complex)$

 (%i4) isreal_p(z);
 (%o4) isreal_p(z)
</PRE>

<P>
<B>Limitations</B>
Too often, <CODE>isreal_p</CODE> returns a noun form when it should be able
to return false; a simple example: the logarithm function isn't
real-valued on the entire real line, so <CODE>isreal_p(log(x))</CODE> should
return false; however

<PRE>
 (%i5) isreal_p(log(x));
 (%o5) isreal_p(log(x))
</PRE>

<P>
<B>To use</B> <TT>`load(to_poly_solver)'</TT>


<P>
<B>Related functions</B> <I>complex_number_p</I>


<P>
<B>Status</B> The function <CODE>real_p</CODE> is experimental; its
specifications might change and its functionality might be merged into
other Maxima functions.
</DL>


<P>
<DL>
<DT><U>Function:</U> <B>new_variable</B> <I>(type)</I>
<DD><A NAME="IDX12"></A>


<P>
Return a unique symbol of the form <EM>%[z,n,r,c,g]k</EM>, where
<EM>k</EM> is an integer. The allowed values for <EM>type</EM> are
<I>integer, natural_number, real, natural_number,</I> and <I>general</I>.
(By natural number, we mean the <I>nonnegative integers</I>; thus zero is
a natural number. Some, but not all,definitions of natural number
<I>exclude</I> zero.)


<P>
When <EM>type</EM> isn't one of the allowed values, <EM>type</EM> defaults
to <EM>general</EM>. For integers, natural numbers, and complex numbers,
Maxima automatically appends this information to the fact database.

<PRE>
 (%i1) map('new_variable, ['integer, 'natural_number, 'real, 'complex, 'general]);
 (%o1) [%z17,%n18,%r19,%c20,%g21]

 (%i2) featurep(%z0, 'integer);
 (%o2) true

 (%i3) featurep(%n1, 'integer);
 (%o3) true

 (%i4) is(%n1 &#62;= 0);
 (%o4) true

 (%i5) featurep(%c20, 'complex);
 (%o5) true
</PRE>

<P>
<B>Note</B> Generally, the argument to <CODE>new_variable</CODE> should be quoted. The quote
will protect against errors similar to 

<PRE>
 (%i1) integer : 12$

 (%i2) new_variable(integer);
 (%o2) %g4

 (%i3) new_variable('integer);
 (%o3) %z5
</PRE>

<P>
<B>Related functions</B> <I>nicedummies</I>


<P>
<B>To use</B> <TT>`load(to_poly_solver)'</TT>


<P>
<B>Status</B> The function <CODE>new_variable</CODE> is experimental; its
specifications might change and its functionality might be merged into
other Maxima functions.


</DL>

<P>
<DL>
<DT><U>Function:</U> <B>nicedummies</B>
<DD><A NAME="IDX13"></A>


<P>
Starting with zero, the function <CODE>nicedummies</CODE> re-indexes the variables 
in an expression that were introduced by <CODE>new_variable</CODE>;



<PRE>
 (%i1) new_variable('integer) + 52 * new_variable('integer);
 (%o1) 52*%z1+%z0

 (%i2) new_variable('integer) - new_variable('integer);
 (%o2) %z2-%z3

 (%i3) nicedummies(%);
 (%o3) %z0-%z1
</PRE>

<P>
<B>Related functions</B> <I>new_variable</I>


<P>
<B>To use</B> <TT>`load(to_poly_solver)'</TT>


<P>
<B>Status</B> The function <CODE>nicedummies</CODE> is experimental; its
specifications might change and its functionality might be merged into
other Maxima functions.


</DL>

<P>
<DL>
<DT><U>Function:</U> <B>parg</B> <I>(<VAR>x</VAR>)</I>
<DD><A NAME="IDX14"></A>


<P>
The function <CODE>parg</CODE> is a simplifying version of the complex argument function 
<CODE>carg</CODE>; thus

<PRE>
 (%i1) map('parg,[1,1+%i,%i, -1 + %i, -1]);
 (%o1) [0,%pi/4,%pi/2,(3*%pi)/4,%pi]
</PRE>

<P>
Generally, for a non-constant input, <CODE>parg</CODE> returns a noun form; thus

<PRE>
 (%i1) parg(x + %i * sqrt(x));
 (%o1) parg(x+%i*sqrt(x))
</PRE>

<P>
When <CODE>sign</CODE> can determine that the input is a positive or negative real
number, <CODE>parg</CODE> will return a non-noun form for a non-constant input. 
Here are two examples:

<PRE>
 (%i1) parg(abs(x));
 (%o1) 0

 (%i2) parg(-x^2-1);
 (%o2) %pi
</PRE>

<P>
<B>Note</B> The <CODE>sign</CODE> function mostly ignores the variables that are declared
to be complex (<CODE>declare(x,complex)</CODE>); for variables that are declared
to be complex, the <CODE>parg</CODE> can return incorrect values; for example

<PRE>
(%i1) declare(x,complex)$

(%i2) parg(x^2 + 1);
(%o2) 0
</PRE>

<P>
<B>Related function</B> <I>carg, isreal_p</I>


<P>
<B>To use</B> <TT>`load(to_poly_solver)'</TT>


<P>
<B>Status</B> The function <CODE>parg</CODE> is experimental; its
specifications might change and its functionality might be merged into
other Maxima functions.


</DL>

<P>
<DL>
<DT><U>Function:</U> <B>real_imagpart_to_conjugate</B> <I>(<VAR>e</VAR>)</I>
<DD><A NAME="IDX15"></A>


<P>
The function <CODE>real_imagpart_to_conjugate</CODE> replaces all occurrences
of <CODE>realpart</CODE> and <CODE>imagpart</CODE> to algebraically equivalent expressions
involving the <CODE>conjugate</CODE>.



<PRE>
(%i1) declare(x,complex)$
(%i3) real_imagpart_to_conjugate(realpart(x) +  imagpart(x) = 3);
(%o3) (conjugate(x)+x)/2-(%i*(x-conjugate(x)))/2=3
</PRE>

<P>
<B>To use</B> <TT>`load(to_poly_solver)'</TT>


<P>
<B>Status</B> The function <CODE>real_imagpart_to_conjugate</CODE> is experimental; its
specifications might change and its functionality might be merged into
other Maxima functions.


</DL>

<P>
<DL>
<DT><U>Function:</U> <B>rectform_log_if_constant</B> <I>(<VAR>e</VAR>)</I>
<DD><A NAME="IDX16"></A>


<P>
The function <CODE>rectform_if_constant</CODE> converts all terms of the form
<CODE> log(c)</CODE> to  <CODE>rectform(log(c))</CODE>, where <CODE>c</CODE> is
either a declared constant expression or explicitly declared constant



<PRE>
 (%i2) rectform_log_if_constant(log(1-%i) - log(x - %i));
 (%o2) -log(x-%i)+log(2)/2-(%i*%pi)/4

 (%i3) declare(a,constant, b,constant)$

 (%i4) rectform_log_if_constant(log(a + %i*b));
 (%o4) log(b^2+a^2)/2+%i*atan2(b,a)
</PRE>

<P>
<B>To use</B> <TT>`load(to_poly_solver)'</TT>


<P>
<B>Status</B> The function <CODE>rectform_log_if_constant</CODE> is
experimental; the specifications of this function might change might change and its functionality
might be merged into other Maxima functions.


</DL>

<P>
<DL>
<DT><U>Function:</U> <B>simp_inequality</B> <I>(<VAR>e</VAR>)</I>
<DD><A NAME="IDX17"></A>


<P>
The function <CODE>simp_inequality</CODE> applies some simplifications to
conjunctions and disjunctions of inequations.


<P>
<B>Limitations</B> The function <CODE>simp_inequality</CODE> is limited in at least two ways;
first, the simplifications are local; thus

<PRE>
(%i1) simp_inequality((x &#62; minf) %and (x &#60; 0));
(%o2) (x&#62;1) %and (x&#60;1)
</PRE>

<P>
And second, <CODE>simp_inequality</CODE> doesn't consult the fact database:

<PRE>
 (%i1) assume(x &#62; 0)$

 (%i2) simp_inequality(x &#62; 0);
 (%o2) x&#62;0
</PRE>

<P>
<B>To use</B> <TT>`load(fourier_elim)'</TT>


<P>
<B>Status</B> The function <CODE>simp_inequality</CODE> is experimental; its
specifications might change and its functionality might be merged into
other Maxima functions.


</DL>

<P>
<DL>
<DT><U>Function:</U> <B>standardize_inverse_trig</B> <I>(<VAR>e</VAR>)</I>
<DD><A NAME="IDX18"></A>


<P>
This function applies the identities <CODE>cot(x) = atan(1/x),
acsc(x) = asin(1/x),</CODE> and similarly for <CODE>asec, acoth, acsch</CODE>
and <CODE>asech</CODE> to an expression. See Abramowitz and Stegun, 
Eqs. 4.4.6 through 4.4.8 and 4.6.4 through 4.6.6.


<P>
<B>To use</B> <TT>`load(to_poly_solver)'</TT>


<P>
<B>Status</B> The function <CODE>standardize_inverse_trig</CODE> is experimental; its
specifications might change and its functionality might be merged into
other Maxima functions.
</DL>


<P>
<DL>
<DT><U>Function:</U> <B>subst_parallel</B> <I>(<VAR>l</VAR>, <VAR>e</VAR>)</I>
<DD><A NAME="IDX19"></A>


<P>
When <CODE>l</CODE> is a single equation or a list of equations, substitute
the right hand side of each equation for the left hand side. The
substitutions are made in parallel; for example

<PRE>
 (%i2) subst_parallel([x=y,y=x], [x,y]);
 (%o2) [y,x]
</PRE>

<P>
Compare this to substitutions made serially:

<PRE>
 (%i3) subst([x=y,y=x],[x,y]);
 (%o3) [x,x]
</PRE>

<P>
The function <CODE>subst_parallel</CODE> is similar to <CODE>sublis</CODE> except that
<CODE>subst_parallel</CODE> allows for substitution of nonatoms; for example

<PRE>
 (%i6) subst_parallel([x^2 = a, y = b], x^2 * y);
 (%o6) a*b

 (%i7) sublis([x^2 = a, y = b], x^2 * y);
  `sublis': Bad 1st arg
</PRE>

<P>
The substitutions made by <CODE>subst_parallel</CODE> are literal, not semantic; thus 
<CODE>subst_parallel</CODE> <I>does not</I> recognize that <EM>x * y</EM> is a subexpression 
of <EM>x^2 * y</EM>

<PRE>
 (%i9) subst_parallel([x * y = a], x^2 * y);
 (%o9) x^2*y
</PRE>

<P>
The function <CODE>subst_parallel</CODE> completes all substitutions
<I>before</I> simplifications. This allows for substitutions into
conditional expressions where errors might occur if the
simplifications were made earlier:

<PRE>
 (%i12) subst_parallel([x = 0], %if(x &#60; 1, 5, log(x)));
 (%o12) 5

 (%i13) subst([x = 0], %if(x &#60; 1, 5, log(x)));
  log(0) has been generated.
</PRE>

<P>
<B>Related functions</B> <I>subst, sublis, ratsubst</I>


<P>
<B>To use</B> <TT>`load(to_poly_solve_extra.lisp)'</TT>


<P>
<B>Status</B> The function <CODE>subst_parallel</CODE> is experimental; the
specifications of this function might change might change and its
functionality might be merged into other Maxima functions.


</DL>

<P>
<DL>
<DT><U>Function:</U> <B>to_poly</B> <I>(<VAR>e</VAR>, <VAR>l</VAR>)</I>
<DD><A NAME="IDX20"></A>


<P>
The function <CODE>to_poly</CODE> attempts to convert the equation <CODE>e</CODE>
into a polynomial system along with inequality constraints; the
solutions to the polynomial system that satisfy the constraints are
solutions to the equation <CODE>e</CODE>. Informally, <CODE>to_poly</CODE>
attempts to polynomialize the equation <VAR>e</VAR>; an example might
clarify:



<PRE>
 (%i2) to_poly(sqrt(x) = 3, [x]);
 (%o2) [[%g6-3,x=%g6^2],[-%pi/2&#60;parg(%g6),parg(%g6)&#60;=%pi/2],[]]
</PRE>

<P>
The conditions <EM>-%pi/2&#60;parg(%g6),parg(%g6)&#60;=%pi/2</EM> tell us that
<EM>%g6</EM> is in the range of the square root function. When this is
true, the solution set to <EM>sqrt(x) = 3</EM> is the same as the
solution set to <EM>%g6-3,x=%g6^2</EM>.


<P>
To polynomialize trigonometric expressions, it is necessary to
introduce a nonalgebraic substitution; these nonalgebraic substitutions
are returned in the third list returned by <CODE>to_poly</CODE>; for example



<PRE>
(%i3) to_poly(cos(x),[x]);
(%o3) [[%g7^2+1],[2*%g7#0],[%g7=%e^(%i*x)]]
</PRE>

<P>
Constant terms aren't polynomializied unless the number one is a member of
the variable list; for example

<PRE>
 (%i1) to_poly(x = sqrt(5),[x]);
 (%o1) [[x-sqrt(5)],[],[]]

 (%i2) to_poly(x = sqrt(5),[1,x]);
 (%o2) [[x-%g31,5=%g31^2],[-%pi/2&#60;parg(%g31),parg(%g31)&#60;=%pi/2],[]]
</PRE>

<P>
To generate a polynomial with <EM>sqrt(5) + sqrt(7)</EM> as
one of its roots, use the commands

<PRE>
 (%i3) first(elim_allbut(first(to_poly(x = sqrt(5) + sqrt(7),[1,x])), [x]));
 (%o3) [x^4-24*x^2+4]
</PRE>

<P>
<B>Related functions</B> <I>to_poly_solve</I>


<P>
<B>To use</B> <TT>`load(to_poly)'</TT>


<P>
<B>Status:</B> The function <CODE>to_poly</CODE> is experimental; its
specifications might change and its functionality might be merged into
other Maxima functions.


</DL>

<P>
<DL>
<DT><U>Function:</U> <B>to_poly_solve</B> <I>(<VAR>e</VAR>, <VAR>l</VAR>, [options])</I>
<DD><A NAME="IDX21"></A>


<P>
The function <CODE>to_poly_solve</CODE> tries to solve the equations
<EM>e</EM> for the variables <EM>l</EM>. The equation(s) <EM>e</EM> can
either be a single expression or a set or list of expressions;
similarly, <EM>l</EM> can either be a single symbol or a list of set of
symbols.


<P>
The basic strategy of <CODE>to_poly_solve</CODE> is use <CODE>to_poly</CODE> to
convert the input into a polynomial form and call <CODE>algsys</CODE> on the
polynomial system. Thus user options that affect <CODE>algsys</CODE>,
especially <CODE>algexact</CODE>, also affect <CODE>to_poly_solve</CODE>. The
default for <CODE>algexact</CODE> is false, but for <CODE>to_poly_solve</CODE>,
generally <CODE>algexact</CODE> should be true. The function
<CODE>to_poly_solve</CODE> does not locally set <CODE>algexact</CODE> to true
because this would make it impossible to find approximate solutions
when the <CODE>algsys</CODE> is unable to determine an exact solution.


<P>
The function <CODE>to_poly_solve</CODE> is a simplifying function. An alias
for <CODE>to_poly_solve</CODE> is <CODE>%solve</CODE>. When <CODE>to_poly_solve</CODE>
is unable to find a solution set, it returns a <CODE>%solve</CODE> noun form.


<P>
The function <CODE>to_poly_solve</CODE> is able to solve some, but not all,
equations involving rational powers, some nonrational powers, absolute
values, trigonometric functions, and minimum and maximum. Also, some it can
solve some equations that are solvable in in terms of the Lambert W function;
some examples:



<PRE>
 (%i1) to_poly_solve(set(max(x,y) = 5, x+y = 2), set(x,y));
 (%o1) %union([x=-3,y=5],[x=5,y=-3])

 (%i2) to_poly_solve(abs(1-abs(1-x)) = 10,x);
 (%o2) %union([x=-10],[x=12])

 (%i3) to_poly_solve(set(sqrt(x) + sqrt(y) = 5, x + y = 10), set(x,y));
 (%o3) %union([x=-(5*sqrt(5)*%i-10)/2,y=(5*sqrt(5)*%i+10)/2],[x=(5*sqrt(5)*%i+10)/2,y=-(5*sqrt(5)*%i-10)/2])

 (%i4) to_poly_solve(cos(x) * sin(x) = 1/2,x, 'simpfuncs = ['expand, 'nicedummies]);
 (%o4) %union([x=%pi*%z0+%pi/4])

 (%i5) to_poly_solve(x^(2*a) + x^a + 1,x);

 (%o5) %union([x = (-sqrt(3)*%i-1)^(1/a)*%e^(2*%i*%pi*%z10/a)/2^(1/a)],
              [x = (sqrt(3)*%i-1)^(1/a)*%e^(2*%i*%pi*%z9/a)/2^(1/a)])

 (%i6) to_poly_solve(x * exp(x) = a, x);
 (%o6) %union([x = lambert_w(a)])

</PRE>

<P>
For  <EM>linear</EM> inequalities, <CODE>to_poly_solve</CODE> does Fourier elimination:

<PRE>
 (%i1) to_poly_solve([x + y &#60; 1, x - y &#62;= 8],[x,y]);
 (%o1) %union([x = y+8,y &#60; -7/2],[y+8 &#60; x,x &#60; 1-y,y &#60; -7/2])
</PRE>

<P>
When <EM>to_poly_solve</EM> is able to find the solution set, it returns
a <EM>%union</EM> object; each argument to the <EM>%union</EM> object is
a solution to the equation; for example

<PRE>
 (%i1) to_poly_solve(sqrt(x) - x = 1/4,x);
 (%o1) %union([x=1/4])

 (%i2) to_poly_solve(sqrt(x) - x = 42,x);
 (%o2) %union([x=(sqrt(167)*%i-83)/2],[x=-(sqrt(167)*%i+83)/2])
</PRE>

<P>
When <EM>to_poly_solve</EM> is unable to find the solution set, it returns a
noun form; for example,

<PRE>
(%i6) to_poly_solve(a*x^9 + x^2 - 1,x);
(%o6) %solve([a*x^9+x^2-1],[x])

(%i7) subst(a=0,%);
(%o7) %union([x = -1],[x = 1])
</PRE>

<P>
Each optional argument to <EM>to_poly_solve</EM> must be an equation;
generally, the order of these options does not matter.



<UL>

<LI><EM>simpfuncs = l</EM>, where <EM>l</EM> is a list of functions.

Apply the composition of the members of l to each solution.

<PRE>
 (%i1) to_poly_solve(x^2=%i,x);
 (%o1) %union([x=-(-1)^(1/4)],[x=(-1)^(1/4)])

 (%i2) to_poly_solve(x^2= %i,x, 'simpfuncs = ['rectform]);
 (%o2) %union([x=-%i/sqrt(2)-1/sqrt(2)],[x=%i/sqrt(2)+1/sqrt(2)])
</PRE>

Sometimes additional simplification can revert a simplification; for example

<PRE>
 (%i1) to_poly_solve(x^2=1,x);
 (%o1) %union([x=-1],[x=1])

 (%i2) to_poly_solve(x^2= 1,x, 'simpfuncs = [polarform]);
 (%o2) %union([x=1],[x=%e^(%i*%pi)])
</PRE>

Maxima doesn't try to check that each member of the function list <EM>l</EM> is
purely a simplification; thus

<PRE>
(%i3) to_poly_solve(x^2 = %i,x, 'simpfuncs = [lambda([s],s^2)]);
(%o3) %union([x=%i])
</PRE>

To convert each solution to a double float, use <EM>simpfunc = ['dfloat]</EM>:

<PRE>
(%i4) to_poly_solve(x^3 +x + 1 = 0,x, 'simpfuncs = ['dfloat]), algexact : true;
(%o4) %union([x=-0.68232780382802],[x=0.34116390191401-1.161541399997252*%i],
              [x=1.161541399997252*%i+0.34116390191401])
</PRE>

<LI><EM>use_grobner = true</EM> With this option, the function

<EM>poly_reduced_grobner</EM> is applied to the equations before
attempting their solution. Primarily, this option provides a workaround
for weakness in the function <EM>algsys</EM>. Here is an example of
such a workaround:

<PRE>
(%i1) to_poly_solve([x^2+y^2=2^2,(x-1)^2+(y-1)^2=2^2],[x,y], 'use_grobner = true);
(%o1) %union([x=-(sqrt(7)-1)/2,y=(sqrt(7)+1)/2],[x=(sqrt(7)+1)/2,y=-(sqrt(7)-1)/2])

(%i2) to_poly_solve([x^2+y^2=2^2,(x-1)^2+(y-1)^2=2^2],[x,y]);
(%o2) %union()
</PRE>

<LI><EM>maxdepth = k</EM>, where <EM>k</EM> is a positive integer. This

function controls the maximum recursion depth for the solver. The
default value for <EM>maxdepth</EM> is five. When the recursions depth is exceeded, the

solver signals an error:

<PRE>
 (%i1) to_poly_solve(cos(x) = x,x, 'maxdepth = 2);
Maximum recursion depth exceeded; unable to solve 
</PRE>

<LI><EM>parameters = l</EM>, where <EM>l</EM> is a list of symbols. The solver

attempts to return a solution that is valid for all members of the list <EM>l</EM>;
for example:

<PRE>
(%i1) to_poly_solve(a * x = x, x);
(%o1) %union([x=0])

(%i2) to_poly_solve(a * x = x, x, 'parameters = [a]);
(%o2) %union(%if(a-1=0,[x=%c123],%union()),%if(a-1#0,[x=0],%union()))
</PRE>

In <EM>(%o2)</EM>, the solver introduced a dummy variable; to re-index the
these dummy variables, use the function <EM>nicedummies</EM>:

<PRE>
 (%i3) nicedummies(%);
 (%o3) %union(%if(a-1=0,[x=%c0],%union()),%if(a-1#0,[x=0],%union()))
</PRE>

</UL>

<P>
The <CODE>to_poly_solver</CODE> uses data stored in the hashed array
<CODE>one_to_one_reduce</CODE> to solve equations of the form <EM>f(a) =
f(b)</EM>. The assignment <CODE>one_to_one_reduce['f,'f] : lambda([a,b],
a=b)</CODE> tells <CODE>to_poly_solver</CODE> that the solution set of <EM>f(a)
= f(b)</EM> equals the solution set of <EM>a=b</EM>; for example

<PRE>
 (%i2) one_to_one_reduce['f,'f] : lambda([a,b], a=b)$
 (%i3) to_poly_solve(f(x^2-1) = f(0),x);
 (%o3) %union([x = - 1], [x = 1])
</PRE>

<P>
More generally, the assignment <CODE>one_to_one_reduce['f,'g] : lambda([a,b],
w(a,b)=0</CODE> tells <CODE>to_poly_solver</CODE> that the solution set of <EM>f(a)
= f(b)</EM> equals the solution set of <EM>w(a,b) = 0</EM>; for example

<PRE>
 (%i4) one_to_one_reduce['f,'g] : lambda([a,b], a = 1 + b/2)$
 (%i5) to_poly_solve(f(x) - g(x),x);
 (%o5) %union([x = 2])
</PRE>

<P>
Additionally, <CODE>to_poly_solver</CODE> uses data stored in the hashed array 
<CODE>function_inverse</CODE> to solve equations of the form <EM>f(a) = b</EM>. 
The assignment <CODE>function_inverse['f] : lambda([s], g(s))</CODE> 
informs  <CODE>to_poly_solver</CODE> that solution set to <CODE>f(x) = b</CODE> equals
the solution set to <CODE>x = g(b)</CODE>; two examples:

<PRE>
 (%i6) function_inverse['Q] : lambda([s], P(s))$

 (%i7) to_poly_solve(Q(x-1) = 2009,x);
 (%o7) %union([x = P(2009) + 1])

 (%i8) function_inverse['G] : lambda([s], s + new_variable(integer));
 (%o8) lambda([s], s + new_variable(integer))

 (%i9) to_poly_solve(G(x - a) = b,x);
 (%o9) %union([x = b + a + %z1289])
</PRE>

<P>
<B>Notes</B>



<UL>

<LI>The solve variables needn't be symbols; when <EM>fullratsubst</EM> is

able to appropriately make substitutions, the solve variables can be nonsymbols:

<PRE>
(%i1) to_poly_solve([x^2 + y^2 + x * y = 5, x * y = 8], [x^2 + y^2, x * y]);
(%o1) %union([x*y=8,y^2+x^2=-3])
</PRE>

<LI>For equations that involve complex conjugates, the solver automatically

appends the conjugate equations; for example

<PRE>
(%i1) declare(x,complex)$
(%i2) to_poly_solve(x + (5 + %i) * conjugate(x) = 1, x);
(%o2) %union([x=(%i+4)/25])

(%i3) declare(y,complex)$
(%i4) to_poly_solve(set(conjugate(x) - y = 42 + %i, x + conjugate(y) = 0), set(x,y));
(%o4) %union([x=-(%i-42)/2,y=-(%i+42)/2])
</PRE>

<LI>For an equation that involves the absolute value function, the

<EM>to_poly_solver</EM> consults the fact database to decide if the
argument to the absolute value is complex valued. When

<PRE>
(%i1) to_poly_solve(abs(x) = 6,x);
(%o1) %union([x=-6],[x=6])

(%i2) declare(z,complex)$
(%i3) to_poly_solve(abs(z) = 6,z);
(%o3) %union([z=%r38-%i*sqrt(36-%r38^2)],[z=%i*sqrt(36-%r39^2)+%r39])
</PRE>

<I>This is the only situation that the solver consults the fact database. If
a solve variable is declared to be an integer, for example, <EM>to_poly_solve</EM>
ignores this declaration</I>.
</UL>

<P>
<B>Relevant option variables</B> <I>algexact, resultant, algebraic</I>


<P>
<B>Related functions</B> <I>to_poly</I>


<P>
<B>To use</B> <TT>`load(to_poly_solve)'</TT>


<P>
<B>Status:</B> The function <CODE>to_poly_solve</CODE> is experimental; its
specifications might change and its functionality might be merged into
other Maxima functions.
</DL>
<P><HR><P>
This document was generated on 2 November 2009 using
<A HREF="http://wwwinfo.cern.ch/dis/texi2html/">texi2html</A>&nbsp;1.56k.
</BODY>
</HTML>
